﻿<!--#include file="../mae/mae.asp"-->
<%
res.Charset = "utf-8"

'初始化
Mo.Start "../mae/Mo", E_ERROR, E_LOG, E_WARNING

function EASPMAE()
	dim Http,InstHttp : set Http = require("net/http/request.js")
	
	'直接保存
	Http.save "https://www.baidu.com/img/bdlogo.png", "./Cache/bdlogo1.png"

	'创建实例再使用实例方法保存
	set InstHttp = Http.create("https://www.baidu.com/img/bdlogo.png")
	InstHttp.save F.mappath("./Cache/bdlogo2.png")

	'读出二进制数据，用IO保存
	IO.file.writeAllBytes "./Cache/bdlogo3.png", InstHttp.getbinary()
	
end function
	
'必要的清理
Mo.End()
%>